package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhServiceOrderAppointmentMapper;
import com.ruoyi.zsyh.domain.ZsyhServiceOrderAppointment;
import com.ruoyi.zsyh.service.IZsyhServiceOrderAppointmentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 师傅预约用户Service业务层处理
 * 
 * @author yuexl
 * @date 2022-09-06
 */
@Service
public class ZsyhServiceOrderAppointmentServiceImpl implements IZsyhServiceOrderAppointmentService 
{
    @Autowired
    private ZsyhServiceOrderAppointmentMapper zsyhServiceOrderAppointmentMapper;

    /**
     * 查询师傅预约用户
     * 
     * @param id 师傅预约用户ID
     * @return 师傅预约用户
     */
    @Override
    public ZsyhServiceOrderAppointment selectZsyhServiceOrderAppointmentById(String id)
    {
        return zsyhServiceOrderAppointmentMapper.selectZsyhServiceOrderAppointmentById(id);
    }

    /**
     * 查询师傅预约用户列表
     * 
     * @param zsyhServiceOrderAppointment 师傅预约用户
     * @return 师傅预约用户
     */
    @Override
    public List<ZsyhServiceOrderAppointment> selectZsyhServiceOrderAppointmentList(ZsyhServiceOrderAppointment zsyhServiceOrderAppointment)
    {
        return zsyhServiceOrderAppointmentMapper.selectZsyhServiceOrderAppointmentList(zsyhServiceOrderAppointment);
    }

    /**
     * 新增师傅预约用户
     * 
     * @param zsyhServiceOrderAppointment 师傅预约用户
     * @return 结果
     */
    @Override
    public int insertZsyhServiceOrderAppointment(ZsyhServiceOrderAppointment zsyhServiceOrderAppointment)
    {
        zsyhServiceOrderAppointment.setCreateTime(DateUtils.getNowDate());
        return zsyhServiceOrderAppointmentMapper.insertZsyhServiceOrderAppointment(zsyhServiceOrderAppointment);
    }

    /**
     * 修改师傅预约用户
     * 
     * @param zsyhServiceOrderAppointment 师傅预约用户
     * @return 结果
     */
    @Override
    public int updateZsyhServiceOrderAppointment(ZsyhServiceOrderAppointment zsyhServiceOrderAppointment)
    {
        return zsyhServiceOrderAppointmentMapper.updateZsyhServiceOrderAppointment(zsyhServiceOrderAppointment);
    }

    /**
     * 删除师傅预约用户对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceOrderAppointmentByIds(String ids)
    {
        return zsyhServiceOrderAppointmentMapper.deleteZsyhServiceOrderAppointmentByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除师傅预约用户信息
     * 
     * @param id 师傅预约用户ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceOrderAppointmentById(String id)
    {
        return zsyhServiceOrderAppointmentMapper.deleteZsyhServiceOrderAppointmentById(id);
    }
}
